package com.miracle.handler.exception;


import com.miracle.common.response.ResultInfo;
import lombok.Data;

/**
 * @author jie.xi
 * @date 2022年05月17日 13:42
 */
@Data
public class MyRuntimeException extends RuntimeException{

    private String code;
    private String message;


    public MyRuntimeException(String code,String message){
        this.code = code;
        this.message = message;
    }
    public MyRuntimeException(ResultInfo resultInfo){
        this.code = resultInfo.getCode();
        this.message = resultInfo.getMessage();
    }
}
